interface Person {
  name: string;
  age: number;
  job: string;
  sayName: () => void;
}

function Person(name?: string, age?: number, job?: string) {
  this.name = name === void 0 ? 'Nicholas' : name;
  this.age = age === void 0 ? 20 : age;
  this.job = job === void 0 ? 'Software Enginner': job;
}

Person.prototype = {
  sayName(): void {
    console.log(this.name);
  }
};
Object.defineProperty(Person.prototype, 'constructor', {
  enumerable: false,
  value: Person
});
